home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3dm / audio / alGetFrameNumber.z / alGetFrameNumber
Encoding:
Text File  |  1998-10-20  |  5.9 KB  |  133 lines

  1.  
  2.  
  3.  
  4. aaaallllGGGGeeeettttFFFFrrrraaaammmmeeeeNNNNuuuummmmbbbbeeeerrrr((((3333ddddmmmm))))                                    aaaallllGGGGeeeettttFFFFrrrraaaammmmeeeeNNNNuuuummmmbbbbeeeerrrr((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      alGetFrameNumber - Get the absolute sample frame number associated with a
  10.      port
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiioooo....hhhh>>>>
  14.  
  15.      iiiinnnntttt aaaallllGGGGeeeettttFFFFrrrraaaammmmeeeeNNNNuuuummmmbbbbeeeerrrr((((ccccoooonnnnsssstttt AAAALLLLppppoooorrrrtttt ppppoooorrrrtttt,,,, ssssttttaaaammmmpppp____tttt ****ffffnnnnuuuummmm))))
  16.  
  17. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  18.      _p_o_r_t expects the AAAALLLLppppoooorrrrtttt structure for the audio port for which you wish
  19.           to know the sample frame number.  This structure is the returned
  20.           value of the aaaallllOOOOppppeeeennnnPPPPoooorrrrtttt((((3333ddddmmmm)))) call.
  21.  
  22.      _f_n_u_m expects a pointer to an unsigned 64-bit value which is to contain
  23.           the resultant sample-frame number.
  24.  
  25. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  26.      Each audio device on a system counts how many sample frames have come in
  27.      or gone out of that device. This count is known as the absolute sample
  28.      frame number for that device. All audio ports connected to a given device
  29.      share its absolute frame number as a common timeline.
  30.  
  31.      For an input port, aaaallllGGGGeeeettttFFFFrrrraaaammmmeeeeNNNNuuuummmmbbbbeeeerrrr returns the absolute sample frame
  32.      number associated with the next sample frame to be read from the port.
  33.      If the port's queue is in an overflow state, the frame number will be
  34.      constantly changing. The application should bring the port out of
  35.      overflow state by reading or discarding sample frames, then re-examine
  36.      the value of aaaallllGGGGeeeettttFFFFrrrraaaammmmeeeeNNNNuuuummmmbbbbeeeerrrr.
  37.  
  38.      For an output port, aaaallllGGGGeeeettttFFFFrrrraaaammmmeeeeNNNNuuuummmmbbbbeeeerrrr returns the absolute sample frame
  39.      number associated with the next sample frame to be written to the port.
  40.      If the port's queue is in an underflow state, the frame number will be
  41.      constantly changing. The application should bring the port out of
  42.      overflow state by writing samples into it, then re-examine the value of
  43.      aaaallllGGGGeeeettttFFFFrrrraaaammmmeeeeNNNNuuuummmmbbbbeeeerrrr.
  44.  
  45.      For ports transferring subcode data, the sample frame number returned by
  46.      aaaallllGGGGeeeettttFFFFrrrraaaammmmeeeeNNNNuuuummmmbbbbeeeerrrr corresponds to the sample frame number of the last audio
  47.      data sample associated with the subcode frame.
  48.  
  49.      Practically speaking, aaaallllGGGGeeeettttFFFFrrrraaaammmmeeeeNNNNuuuummmmbbbbeeeerrrr allows an application to precisely
  50.      determine when a port's samples came into the machine or when they will
  51.      go out, using the sample-frame counter as a timeline. To reference this
  52.      timeline to the timelines for other media, or for other audio devices,
  53.      the aaaallllGGGGeeeettttFFFFrrrraaaammmmeeeeTTTTiiiimmmmeeee(((()))) call should be used as well.
  54.  
  55.      See the manual page for alGetFrameTime for a code example illustrating
  56.      how these two calls work.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. aaaallllGGGGeeeettttFFFFrrrraaaammmmeeeeNNNNuuuummmmbbbbeeeerrrr((((3333ddddmmmm))))                                    aaaallllGGGGeeeettttFFFFrrrraaaammmmeeeeNNNNuuuummmmbbbbeeeerrrr((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  75.      Upon successful completion, aaaallllGGGGeeeettttFFFFrrrraaaammmmeeeeNNNNuuuummmmbbbbeeeerrrr returns 0. Otherwise
  76.      aaaallllGGGGeeeettttFFFFrrrraaaammmmeeeeNNNNuuuummmmbbbbeeeerrrr returns -1 and sets an error number which can be
  77.      retrieved with oooosssseeeerrrrrrrroooorrrr((((3333CCCC)))).
  78.  
  79.      aaaallllGGGGeeeettttFFFFrrrraaaammmmeeeeNNNNuuuummmmbbbbeeeerrrr can fail for the following reasons:
  80.  
  81.      AAAALLLL____BBBBAAAADDDD____PPPPOOOORRRRTTTT            _p_o_r_t is invalid.
  82.  
  83.      AAAALLLL____BBBBAAAADDDD____NNNNOOOOTTTT____IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTEEEEDDDD the feature is not implemented on the given
  84.                             machine. aaaallllGGGGeeeettttFFFFrrrraaaammmmeeeeNNNNuuuummmmbbbbeeeerrrr is not implemented on
  85.                             Indigo R4K (IP20) systems.
  86.  
  87. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  88.      alOpenPort(3dm), alGetFrameTime(3dm), oserror(3C)
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.